<!--
 * @Author: xiawei 1243162387@qq.com
 * @Date: 2024-04-28 07:28:09
 * @LastEditors: xiawei 1243162387@qq.com
 * @LastEditTime: 2024-04-30 08:16:00
-->
<template>
    <VcTree :border="true" :data="data" :props="props"></VcTree>
</template>
<script setup lang="ts">
// 树形结构数据
const data = [
  {
    name: 'Level one 1',
    children: [
      {
        name: 'Level two 1-1',
        children: [
          {
            name: 'Level three 1-1-1',
          },
        ],
      },
    ],
  },
  {
    name: 'Level one 2',
    children: [
      {
        name: 'Level two 2-1',
        children: [
          {
            name: 'Level three 2-1-1',
          },
        ],
      },
      {
        name: 'Level two 2-2',
        children: [
          {
            name: 'Level three 2-2-1',
          },
        ],
      },
    ],
  },
  {
    name: 'Level one 3',
    children: [
      {
        name: 'Level two 3-1',
        children: [
          {
            name: 'Level three 3-1-1',
          },
        ],
      },
      {
        name: 'Level two 3-2',
        children: [
          {
            name: 'Level three 3-2-1',
          },
        ],
      },
    ],
  },
]
// 数据显示配置
const props = {
  label: 'name',
  children: 'children'
}
</script>